	<?php
include_once '../common_mbs.inc.php';
include_once '../smarty.inc.php';

//判断访问权限
$admin_index_module_obj = new osgh_admin_index_module_cls();
$is_warrant = $admin_index_module_obj->is_have_warrant($_ADMIN_ID,'consulting_list');
if(!$is_warrant) tcmc_cls::ShowMsg("没有权限访问！", "../index_body.html");

$reply_obj = new consulting_reply_cls();
$act = trim($_INPUT['action']);

if($act =='save')
{
	$consulting_id  = $_INPUT['consulting_id'];
	$reply_content = $_INPUT['reply_content'];	
	if(!empty($consulting_id)){		
		$data = array(
			'reply_addtime'=> time(),
			'consulting_id' => $consulting_id,
			'reply_content' => $reply_content,
		);		
		$reply_obj->add_consultimg_reply($data);
		$up_data = array(
			'status'=>2
		);
		$consulting_obj = new consulting_cls();
		$consulting_obj->update_consulting($up_data, $consulting_id);
		tcmc_cls::ShowMsg("回复咨询成功！", "consulting_list.php");
	}else{		  
		  // $consulting_obj->update_consulting($data, $consulting_id);
		  // tcmc_cls::ShowMsg("修改回复成功！", "consulting_list.php");
	}
}elseif($act =='del'){
	//$consulting_obj->del_consulting($consulting_id);
	//tcmc_cls::ShowMsg("删除回复成功！", "consulting_list.php");
}

?>
